package 第七章构造方法;

/*
 * 账号类
 * */
public class Account {
    private int no;
    private double balance;

    //默认有无参数构造器
    public Account() {
    }


    public Account(int a/*用a给no初始赋值*/) {
        no = a;
    }


    public Account(double b/*用b给balance初始赋值*/) {
        balance = b;
    }

    public Account(int a1, double b1/*用a1给no初始赋值,用b1给balance初始赋值*/) {
        no = a1;
        balance = b1;
    }

    public int getNo() {
        return no;
    }

    public void setNo(int no) {
        this.no = no;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

}
